<?php

namespace app\admin\validate;

use think\Validate;

class BrandValidate extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名'    =>    ['规则1','规则2'...]
     */
    protected $rule = [
        'brand_name' => 'require|min:3|max:25',
        'brand_logo' => 'require',
    ];
    /**
     * 定义错误信息
     */
    protected $message = [
        'brand_name.require' => '名称必须',
        'brand_name.max'     => '名称最多不能超过25个字符',
        'brand_name.min'     => '名称最少3个字符',
        'brand_logo.require' => '品牌logo必须',
    ];
}
